package User;

import Book.BookList;
import SetOpertion.SetIdentity;
import SetOpertion.SetName;

public class Main {

    public static User login() {
        System.out.println("请输入你的姓名：");

        SetName setNames = new SetName();
        String name = setNames.setName();

        System.out.println("请确定你的身份:");
        System.out.println("1--->管理员  2--->普通用户");
        SetIdentity setIdentitys = new SetIdentity();
        int choice = setIdentitys.setIdntity();

        if (choice == 1){
            return new ManageUser(name);
        } else if (choice == 2) {
            return new NormalUser(name);
        } else {
            return null;
        }

    }

    public static void main(String[] args) {

        BookList bookList = new BookList();
        User user = login();
        while(true) {
            int choice = user.meun();
        }

    }
}
